<form id="form_residentes"
	  action="<?php echo url_for('usuario/newResidente'); ?>"
	  method="post"
	  name="form_residentes"
>

<?php echo input_hidden_tag('key'); ?>
<?php echo input_hidden_tag('id_usuario', $object['id_usuario']); ?>

<table class="form">
	<tr>
		<th colspan="4" class="title">Dados do residente</th>
	</tr>
	<tr>
		<th><?php echo $form['nome']->renderLabel(); ?></th>
		<td><?php echo $form['nome']->render(array('name' => 'residente[nome]', 'class' => 'required')); ?></td>
		<th><?php echo $form['parentesco']->renderLabel(); ?></th>
		<td>
			<?php echo $form['parentesco']->render(array('name' => 'residente[parentesco]')); ?>
			<?php include_component('apoio', 'botaoCadastro', array('tp_apoio' => Apoio::PARENTESCO, 'prefix' => 'residente')); ?>
		</td>
	</tr>
	<tr>
		<th><?php echo $form['sexo']->renderLabel(); ?></th>
		<td><?php echo $form['sexo']->render(array('name' => 'residente[sexo]')); ?></td>
		<th><?php echo $form['data_nascimento']->renderLabel(); ?></th>
		<td><?php echo $form['data_nascimento']->render(array('name' => 'residente[data_nascimento]')); ?></td>
	</tr>
	<tr>
		<th><?php echo $form['grau_instrucao']->renderLabel(); ?></th>
		<td>
			<?php echo $form['grau_instrucao']->render(array('name' => 'residente[grau_instrucao]')); ?>
			<?php include_component('apoio', 'botaoCadastro', array('tp_apoio' => Apoio::GRAUINSTRUCAO, 'prefix' => 'residente')); ?>
		</td>
		<th><?php echo $form['ocupacao']->renderLabel(); ?></th>
		<td><?php echo $form['ocupacao']->render(array('name' => 'residente[ocupacao]')); ?></td>
	</tr>
	<tr>
		<th><?php echo $form['renda_mensal']->renderLabel(); ?></th>
		<td><?php echo $form['renda_mensal']->render(array('name' => 'residente[renda_mensal]')); ?></td>
	</tr>
	
	<tr><td colspan="4"><a class="botao btnSalvarResidente">:: Incluir / Salvar ::</a></td></tr>
</table>
</form>

<br />

<div id="listaResidente">
<?php include_partial('listResidentesSuccess', array('ar_residentes' => $ar_residentes)); ?>
</div>

<?php include_partial('residentes.js', array('residente' => $residente))?>